<template>
 <div class='home'>
     <!-- <Header class="headerfix" :isshow='isshow' /> -->
     <Swiper class="swiperindex" :bannerList="bannerList" />
     111
 </div>
</template>

<script>
import Header from '../common/header/Header.vue'
import {getallhomedata} from '../../api/data.js'
import Swiper from '../common/swiper.vue'
   export default {
      data() {
          return {
              isshow:true,
              bannerList:[] //轮播图数据
          }
      },
      //生命周期 - 创建完成
     created(){ 
       	let w = document.documentElement.offsetWidth || document.body.offsetWidth;
         if(w < 750){
          this.isshow = true;
        }else{
          this.isshow=false
            }
     },
     components:{
         Header,
         Swiper
     },

     async  mounted() {
        //获取首页的数据
        let res =await getallhomedata()
        console.log(res)
        this.bannerList=res.title.banner
     },
      methods: {


      },
 }
</script>

<style lang='less' scoped>
.home{
    width: 100%;
    position: relative; 
    min-height: 100vh;
    .swiperindex{
        position: absolute;
        top: 0;
        left: 0;
        z-index: 9 !important;
    }
   
}
</style>